package com.yk.enums;

public enum ResultEnum {
    ERROR(-1, "操作失败"),
    SUCCESS(0, "操作成功"),
    ARG_NULL_ERROR(1, "参数不能为空"),
    UNKNOW_USER_NAME_PASSWORD(2, "账号不存在或者密码错误"),
    LOGIN_SUCCESS(3, "登陆成功"),
    INVALID_TOKEN(4, "无效的token"),
    NAME_ALREAD_REGISTER(5, "账号已经注册"),
    ACCOUNT_STATUS(6, "账号审核中"),
    REGISTER_CODE(7, "验证码不正确"),
    TOO_MANY_REQUEST(8, "请求太多了,请稍后重试"),
    FALLBACK(9, "触发降级");
    private Integer code;
    private String message;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    ResultEnum() {
    }

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
